//
//  LSZSearchKeyManager.m
//  JKFuYinProject
//
//  Created by 九酷 on 2017/12/19.
//  Copyright © 2017年 LC. All rights reserved.
//

#import "LSZSearchKeyManager.h"

@implementation LSZSearchKeyManager
-(id)initWithSearchKey :(NSDictionary *)dic
{
    self = [super init];
    if (self) {
        self.mutMgArray  = [[NSMutableArray alloc]init];
        if ([[dic valueForKey:@"data"] isKindOfClass:[NSString class]]) {
            return self;
        }
        if ([[dic valueForKey:@"data"] isKindOfClass:[NSNumber class]]) {
            return self;
        }
        if (![dic valueForKey:@"data"]) {
            return self;
        }
        NSArray * arrayData = dic[@"data"];
        NSMutableArray * arrayMg = [[NSMutableArray alloc]init];
        for (NSDictionary * diction in arrayData) {
            LSZSearchKeyMg * mg = [[LSZSearchKeyMg alloc]init];
           NSString * title = NullStringjudgment(NSStr(diction[@"title"]));
            if(![title isEqualToString:@""] ){
                mg.title = title;
                [arrayMg addObject:mg];
            }
        }
        self.mutMgArray = arrayMg;
    }
    return self;
}
@end
@implementation LSZSearchKeyMg
@end
